import type { RouteRecordRaw } from 'vue-router';
import { BasicLayout } from '#/layouts';

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'mdi:cog',
      keepAlive: true,
      order: 1000,
      title: '系统管理',
    },
    name: 'Sys',
    path: '/sys',
    children: [
      {
        meta: {
          icon: 'carbon:list',
          title: '账号管理',
        },
        name: 'User',
        path: '/sys/user',
        component: () => import('#/views/sys/user/index.vue'),
      },
      {
        meta: {
          icon: 'carbon:list',
          title: '角色管理',
        },
        name: 'Role',
        path: '/sys/role',
        component: () => import('#/views/sys/role/index.vue'),
      },
      {
        meta: {
          icon: 'carbon:list',
          title: '菜单管理',
        },
        name: 'Menu',
        path: '/sys/menu',
        component: () => import('#/views/sys/menu/index.vue'),
      },
      {
        meta: {
          icon: 'carbon:book',
          title: '数据字典',
        },
        name: 'Dict',
        path: '/sys/dict',
        component: () => import('#/views/sys/dict/index.vue'),
      },
    ],
  },
];

export default routes;
